﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.ShareScreen.ServerProxy
{
    public class ResponseHandlerFactory : Net.IResponseHandlerFactory
    {
        public Net.IResponseHandler Create(byte command)
        {
            if (command == Contract.Command.GetClientList)
            {
                return new ResponseHandler.GetClientListResponseHandler();
            }
            else if (command == Contract.Command.RDConnectToClient)
            {
                return new ResponseHandler.RDConnectToClientHandler();
            }
            else if (command == Contract.Command.RD)
            {
                return new ResponseHandler.RDHandler();
            }
            else if (command == Contract.Command.RDDisconnect)
            {
                return new ResponseHandler.RDDisconnectHandler();
            }
            return null;
        }
    }
}
